/*
 * CouponBO.java
 *
 * Created on March 7, 2007, 1:16 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Data;

/**
 * This is the Coupon Business Object Class
 * @author Danny Beutler
 */
public class CouponBO {
    /**
     * The Guid
     */
    private String id;
    /**
     * The Amount of the Coupon
     */
    private double amount;
    /**
     * The Transaction Line this Coupon is associated with
     */
    private TransactionLineBO TransactionLine;
    /**
     * Boolean for already in the database
     */
    private boolean alreadyInDB=false;
    /**
     * Boolean to show if the BO is dirty
     */
    private boolean dirty =true;
    
    /**
     * Creates a new instance of CouponBO
     * @param GUID The GUID for the Coupon
     */
    public CouponBO(String GUID) {
        this.id=GUID;
    }
    
    /**
     * Gets the coupon GUID
     * @return returns the ID
     */
    public String getId() {
        return id;
    }
    
    /**
     * Gets the coupon amount
     * @return Amount
     */
    public double getAmount() {
        return amount;
    }
    
    /**
     * Sets the coupon amount
     * @param amount The Coupon Amount
     */
    public void setAmount(double amount) {
        dirty=true;
        this.amount = amount;
    }
    
    /**
     * Gets the coupon transaction line
     * @return The Transaction Line associated with the BO
     */
    public TransactionLineBO getTransactionLine() {
        return TransactionLine;
    }
    
     /**
     * Sets the coupon transaction line
     * @param TransactionLine The Transaction Line associated with the BO.
     */
    public void setTransactionLine(TransactionLineBO TransactionLine) {
        dirty=true;
        this.TransactionLine = TransactionLine;
    }
    
    /**
     * Gets the coupon alreadyInDB Variable
     * @return boolean for AlreadyInDB
     */
    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }
    
     /**
     * Sets the coupon alreadyInDB
     * @param alreadyInDB Shows whether the BO is already in the DB.
     */
    public void setAlreadyInDB(boolean alreadyInDB) {
        this.alreadyInDB = alreadyInDB;
    }
    
    /**
     * Gets the coupon isDirty
     * @return Boolean for whether the BO is dirty
     */
    public boolean isDirty() {
        return dirty;
    }
    
     /**
     * Sets the coupon dirty variable
     * @param dirty Set the dirty variable
     */
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }
    
}
